package com.crm.model;

import org.apache.commons.lang.builder.ToStringBuilder;

import java.io.Serializable;

/**
 * @author <a href="mailto:huang0510@hotmail.com">HuangHuang</a>
 * @version $Id$
 * @hibernate.class table="CONTACTS"
 */
public class Contact implements Serializable {

    private String id;
    private String contactName;
    private String department;
    private String jobTitle;
    private String email;
    private String phone;
    private String fax;
    private String dateSave;
    private String whichWeek;
    private String sex;
    private String comments;
    private User user;
    private Customer customer;

    public Contact() {
    }

    public void setId(String id) {
        this.id = id;
    }

    public void setContactName(String contactName) {
        this.contactName = contactName;
    }

    public void setDepartment(String department) {
        this.department = department;
    }

    public void setJobTitle(String jobTitle) {
        this.jobTitle = jobTitle;
    }

    public void setEmail(String email) {
        this.email = email;
    }

    public void setPhone(String phone) {
        this.phone = phone;
    }

    public void setFax(String fax) {
        this.fax = fax;
    }

    public void setDateSave(String dateSave) {
        this.dateSave = dateSave;
    }

    public void setWhichWeek(String whichWeek) {
        this.whichWeek = whichWeek;
    }

    public void setSex(String sex) {
        this.sex = sex;
    }

    public void setComments(String comments) {
        this.comments = comments;
    }

    public String getId() {
        return id;
    }

    public String getContactName() {
        return contactName;
    }

    public String getDepartment() {
        return department;
    }

    public String getJobTitle() {
        return jobTitle;
    }

    public String getEmail() {
        return email;
    }

    public String getPhone() {
        return phone;
    }

    public String getFax() {
        return fax;
    }

    public String getDateSave() {
        return dateSave;
    }

    public String getWhichWeek() {
        return whichWeek;
    }

    public String getSex() {
        return sex;
    }

    public String getComments() {
        return comments;
    }

    public User getUser() {
        return user;
    }

    public void setUser(User user) {
        this.user = user;
    }

    public Customer getCustomer() {
        return customer;
    }

    public void setCustomer(Customer customer) {
        this.customer = customer;
    }

    public String toString() {
        return new ToStringBuilder(this)
                .append("id", getId())
                .append("contactName", getContactName())
                .append("jobTitle", getJobTitle())
                .append("email", getEmail())
                .append("phone", getPhone())
                .append("fax", getFax())
                .append("sex", getSex())
                .append("user", getUser().toString())
                .append("customer", getCustomer().toString())
                .append("comments", getComments())
                .toString();
    }
}
